package com.akkainaction.helloactor.become.actor;

import akka.actor.UntypedActor;
import akka.japi.Procedure;

public class BecomeActor extends UntypedActor {
    @Override
    public void onReceive(Object msg) {
        System.out.println("become actor 接收到消息:" + msg);
        getContext().become(proce);
        System.out.println("------------------------");
    }

    Procedure<Object> proce = msg -> System.out.println("become:" + msg);
}
